package service.Imp;

import Dao.RoomMasterDao;
import Dao.UserApplicationDao;
import Request.DispartIdRequest;
import modal.UserApplication;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import service.AdminManageService;

import java.util.List;

/**
 * Created by tan on 2017/8/24.
 * ${time}
 */
@Service
public class AdminManageServiceImp implements AdminManageService {
    @Autowired
    UserApplicationDao userApplicationDao;

    @Autowired
    RoomMasterDao roomMasterDao;

    public String allowApplication(UserApplication application) {
        return userApplicationDao.allowApplication(application);
    }

    public String refuseApplication(UserApplication application) {
        return userApplicationDao.refuseApplication(application);
    }

    public List<UserApplication> getAllApplication() {
        return userApplicationDao.getAllApplication();
    }

    public String giveID(DispartIdRequest request) {
        return roomMasterDao.addRoommaster(request);
    }
}
